<script lang="ts" context="module">
  import type { Column } from "./conf";
</script>

<script lang="ts">
  export let col: Column;
</script>

<th
  class="th-container"
  class:dt-col-width={!!col.width}
  style:--dt-head-align={col.headAlign || null}
  style:--dt-col-width={col.width || null}
>
  {col.title || ""}
</th>

<style lang="postcss">
  /* :global(.th-container){
    @apply px-2 py-3;
  } */
  .th-container {
    @apply px-2 py-3;
    text-align: var(--dt-head-align, left);
  }
  .dt-col-width {
    width: calc(var(--dt-col-width) * 1px);
  }
</style>
